package com.dkd.easybook.service.impl;

import java.util.List;

import com.dkd.common.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dkd.easybook.mapper.EbUserRemindCategoryMapper;
import com.dkd.easybook.domain.EbUserRemindCategory;
import com.dkd.easybook.service.IEbUserRemindCategoryService;

/**
 * 用户提醒类别Service业务层处理
 * 
 * @author itheima
 * @date 2024-12-13
 */
@Service
public class EbUserRemindCategoryServiceImpl implements IEbUserRemindCategoryService 
{
    @Autowired
    private EbUserRemindCategoryMapper ebUserRemindCategoryMapper;

    /**
     * 查询用户提醒类别
     * 
     * @param userCategoryId 用户提醒类别主键
     * @return 用户提醒类别
     */
    @Override
    public EbUserRemindCategory selectEbUserRemindCategoryByUserCategoryId(Long userCategoryId)
    {
        return ebUserRemindCategoryMapper.selectEbUserRemindCategoryByUserCategoryId(userCategoryId);
    }

    /**
     * 查询用户提醒类别列表
     * 
     * @param ebUserRemindCategory 用户提醒类别
     * @return 用户提醒类别
     */
    @DataScope(deptAlias = "d", userAlias = "u")
    @Override
    public List<EbUserRemindCategory> selectEbUserRemindCategoryList(EbUserRemindCategory ebUserRemindCategory)
    {
        return ebUserRemindCategoryMapper.selectEbUserRemindCategoryList(ebUserRemindCategory);
    }

    /**
     * 新增用户提醒类别
     * 
     * @param ebUserRemindCategory 用户提醒类别
     * @return 结果
     */
    @Override
    public int insertEbUserRemindCategory(EbUserRemindCategory ebUserRemindCategory)
    {
        return ebUserRemindCategoryMapper.insertEbUserRemindCategory(ebUserRemindCategory);
    }

    /**
     * 修改用户提醒类别
     * 
     * @param ebUserRemindCategory 用户提醒类别
     * @return 结果
     */
    @Override
    public int updateEbUserRemindCategory(EbUserRemindCategory ebUserRemindCategory)
    {
        return ebUserRemindCategoryMapper.updateEbUserRemindCategory(ebUserRemindCategory);
    }

    /**
     * 批量删除用户提醒类别
     * 
     * @param userCategoryIds 需要删除的用户提醒类别主键
     * @return 结果
     */
    @Override
    public int deleteEbUserRemindCategoryByUserCategoryIds(Long[] userCategoryIds)
    {
        return ebUserRemindCategoryMapper.deleteEbUserRemindCategoryByUserCategoryIds(userCategoryIds);
    }

    /**
     * 删除用户提醒类别信息
     * 
     * @param userCategoryId 用户提醒类别主键
     * @return 结果
     */
    @Override
    public int deleteEbUserRemindCategoryByUserCategoryId(Long userCategoryId)
    {
        return ebUserRemindCategoryMapper.deleteEbUserRemindCategoryByUserCategoryId(userCategoryId);
    }
}
